|
xportethxe 2.2.1
|
API for configuring and manipulating XPort ETH XE Click driver. More...
Topics | |
| XPort ETH XE Device Settings | |
| Settings for registers of XPort ETH XE Click driver. | |
| XPort ETH XE MikroBUS Map | |
| MikroBUS pin mapping of XPort ETH XE Click driver. | |
Functions | |
| void | xportethxe_cfg_setup (xportethxe_cfg_t *cfg) |
| XPort ETH XE configuration object setup function. | |
| err_t | xportethxe_init (xportethxe_t *ctx, xportethxe_cfg_t *cfg) |
| XPort ETH XE initialization function. | |
| err_t | xportethxe_generic_write (xportethxe_t *ctx, uint8_t *data_in, uint16_t len) |
| XPort ETH XE data writing function. | |
| err_t | xportethxe_generic_read (xportethxe_t *ctx, uint8_t *data_out, uint16_t len) |
| XPort ETH XE data reading function. | |
| void | xportethxe_send_cmd (xportethxe_t *ctx, uint8_t *cmd) |
| XPort ETH XE send cmd function. | |
| void | xportethxe_send_enter (xportethxe_t *ctx) |
| XPort ETH XE send enter function. | |
| void | xportethxe_set_rst_pin (xportethxe_t *ctx, uint8_t state) |
| XPort ETH XE set RST pin function. | |
| void | xportethxe_set_cts_pin (xportethxe_t *ctx, uint8_t state) |
| XPort ETH XE set CTS pin function. | |
| uint8_t | xportethxe_get_rts_pin (xportethxe_t *ctx) |
| XPort ETH XE get RTS pin function. | |
| uint8_t | xportethxe_get_dtr_pin (xportethxe_t *ctx) |
| XPort ETH XE get DTR pin function. | |
| void | xportethxe_reset_device (xportethxe_t *ctx) |
| XPort ETH XE reset device function. | |
API for configuring and manipulating XPort ETH XE Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void xportethxe_cfg_setup | ( | xportethxe_cfg_t * | cfg | ) |
XPort ETH XE configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See xportethxe_cfg_t object definition for detailed explanation. |
| err_t xportethxe_generic_read | ( | xportethxe_t * | ctx, |
| uint8_t * | data_out, | ||
| uint16_t | len ) |
XPort ETH XE data reading function.
This function reads a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
>0 - Number of data bytes read, <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation. | err_t xportethxe_generic_write | ( | xportethxe_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | len ) |
XPort ETH XE data writing function.
This function writes a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| [in] | data_in | : Data buffer for sending. |
| [in] | len | : Number of bytes for sending. |
>=0 - Success, <0 - Error. See #err_t definition for detailed explanation. | uint8_t xportethxe_get_dtr_pin | ( | xportethxe_t * | ctx | ) |
XPort ETH XE get DTR pin function.
This function returns the DTR pin logic state.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| uint8_t xportethxe_get_rts_pin | ( | xportethxe_t * | ctx | ) |
XPort ETH XE get RTS pin function.
This function returns the RTS pin logic state.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| err_t xportethxe_init | ( | xportethxe_t * | ctx, |
| xportethxe_cfg_t * | cfg ) |
XPort ETH XE initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See xportethxe_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void xportethxe_reset_device | ( | xportethxe_t * | ctx | ) |
XPort ETH XE reset device function.
This function resets device by toggling the RST pin state.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| void xportethxe_send_cmd | ( | xportethxe_t * | ctx, |
| uint8_t * | cmd ) |
XPort ETH XE send cmd function.
This function sends a command string by using UART serial interface.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| [in] | cmd | : Command string to send. |
| void xportethxe_send_enter | ( | xportethxe_t * | ctx | ) |
XPort ETH XE send enter function.
This function sends enter (new line) by using UART serial interface.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| void xportethxe_set_cts_pin | ( | xportethxe_t * | ctx, |
| uint8_t | state ) |
XPort ETH XE set CTS pin function.
This function sets the CTS pin logic state.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void xportethxe_set_rst_pin | ( | xportethxe_t * | ctx, |
| uint8_t | state ) |
XPort ETH XE set RST pin function.
This function sets the RST pin logic state.
| [in] | ctx | : Click context object. See xportethxe_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |